Skip to content

test: rank individual and ensemble candidates with synthetic workload costs - #742

Open
milindsrivastava1997 wants to merge 117 commits into
fix/cost-evidence-datasetfrom
732-test-add-prometheus-remote-write-promql-differential-suite
Open

milindsrivastava1997 wants to merge 117 commits into
fix/cost-evidence-datasetfrom
732-test-add-prometheus-remote-write-promql-differential-suite

Conversation

@milindsrivastava1997

@milindsrivastava1997 milindsrivastava1997 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Alignment with updated #737

The complete synthetic-ranking test passes. Besides making each admitted candidate win by changing prices, it rejects otherwise matching quotes from another dataset. Costs remain synthetic; this does not establish production-optimal selection.

Verify Backend candidate ranking independently of real cost calibration or execution correctness.

Before this PR: structural tests also selected winners with fixture costs, while #742 mixed in the differential execution harness.

After this PR: Level 2 uses the same ten-query workload and Planner-exposed candidate inventory as #728. Each unique admissible manifest becomes the cheapest candidate in turn. Before each round the test asserts every other candidate's synthetic total is strictly higher, so the preferred winner follows from construction rather than fixture multiplicities. Assertions cover selection reversal, minimum reported cost, exactly one winner, inventory-order stability, and exclusion of missing/infeasible quotes: the preferred candidate's own evaluation must report EvidenceMissing (quote removed) or ProviderRejected (executable = false). A single losing quote scoped to another dataset must reject the whole evidence with CompileError::CostEvidenceDataset (added in #780). No Planner logical winner is forced to construct the comparison.

Validation: issue754_level2 passes across all ten queries; Clippy on the test targets adds no warnings (the existing certified_topk_input dead-code warning comes from #728's shared support file). All quotes are explicitly synthetic and establish ranking logic only. The final diff against #780 contains only the ranking integration test; the execution harness is preserved in #775.

Current review order: #728 → #786 → #780 → #742 → #775. Workload + synthetic costs → selected Deployment Plan → data-plane execution is the current milestone. #776/#777/#778/#759 are deferred follow-ups, not prerequisites. Tie-breaking between equal-cost candidates and stale/future evidence are out of scope for this ranking test. Online ERP collection, feedback and runtime replanning are not required.

Query ensemble coverage

The fixtures now include each individual query, the shared-rate ensemble
(temporal-rate, grouped-rate, topk-rate), the shared-quantile ensemble
(temporal-quantile, quantile-ratio), and the full ten-query workload.
Level 2 makes each admitted workload candidate cheapest in turn using complete
synthetic quotes, asserts the exact selected manifest, reverses candidate order,
and rejects missing or infeasible cheapest quotes. The complete ranking test passed
for the ten single-query workloads and all three ensembles.

@milindsrivastava1997 milindsrivastava1997 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated code review: 5 findings, posted inline.

Comment thread promql-compliance/runner/lifecycle.go Outdated
Comment thread promql-compliance/runner/cmd/report-card/main.go Outdated
Comment thread promql-compliance/runner/cmd/report-card/main.go Outdated
Comment thread data_plane/Dockerfile Outdated
Comment thread promql-compliance/docker-compose.yml Outdated
@milindsrivastava1997
milindsrivastava1997 force-pushed the 732-test-add-prometheus-remote-write-promql-differential-suite branch from 1501e44 to 0b40465 Compare September 21, 2026 17:58
@milindsrivastava1997
milindsrivastava1997 marked this pull request as ready for review September 22, 2026 03:19
@zzylol
zzylol changed the base branch from main to test/promql-exact-function-coverage September 22, 2026 04:30
@zzylol zzylol changed the title test: add runnable PromQL differential compliance suite test: verify issue 754 level-2 data-plane execution Sep 22, 2026
@zzylol
zzylol changed the base branch from test/promql-exact-function-coverage to issue-755 September 22, 2026 20:45
@zzylol
zzylol force-pushed the 732-test-add-prometheus-remote-write-promql-differential-suite branch from 9c84758 to 00195cb Compare September 24, 2026 12:56
@zzylol
zzylol changed the base branch from issue-755 to issue-752 September 24, 2026 12:57
@zzylol
zzylol changed the base branch from test/promql-exact-function-coverage to fix/cost-evidence-dataset September 28, 2026 18:15
zzylol added a commit that referenced this pull request Sep 28, 2026
…needs

issue754_workload is `#[path]`-included by every level's test binary, so each
binary compiles the whole module while calling only the helpers that level
needs. Under `-D warnings` that turns an unused helper into a hard error in
whichever level does not call it: `certified_topk_input`, added for level 1's
certified heap fixture, broke the level 2 binary in #742.

The lint is about the including binary, not about the fixture, so allow it at
the module level and say why.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: add Prometheus Remote Write PromQL differential suite

2 participants